package com.wbcs.system.datatype;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import javassist.ClassPool;
import javassist.CtClass;

import org.dom4j.Element;

import com.wbcs.config.database.type.AbsDatabaseType;

public interface IDataType extends Cloneable
{
    public void setPreparedStatementValue(int iindex,String value,PreparedStatement pstmt,AbsDatabaseType dbtype) throws SQLException;

    public Object getColumnValue(ResultSet rs,String column,AbsDatabaseType dbtype) throws SQLException;

    public Object getColumnValue(ResultSet rs,int iindex,AbsDatabaseType dbtype) throws SQLException;

    public Object label2value(String label);

    public String value2label(Object value);

    public Class getJavaTypeClass();

    public CtClass getCreatedClass(ClassPool pool);

    public void loadTypeConfig(Element eleDataType);

    public IDataType setUserConfigString(String configstring);
}
